package demo.zyy.com.dreamstudio.bottomnavigation;

import android.support.v4.app.Fragment;

import com.aspsine.fragmentnavigator.FragmentNavigatorAdapter;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/8/14.
 */

public class FragmentAdapter implements FragmentNavigatorAdapter {
   private ArrayList<Fragment> mFragmets;

    public FragmentAdapter(ArrayList<Fragment> fragmets) {
        this.mFragmets = fragmets;
    }

    @Override
    public Fragment onCreateFragment(int i) {
        return mFragmets.get(i);
    }

    @Override
    public String getTag(int i) {
        return String.valueOf(i);
    }

    @Override
    public int getCount() {
        return mFragmets.size();
    }
}
